package com.hyy.taobao.api.entity;

/**
 * 用户
 */
public class User {
    private int userId;
    private String userName;
    private String userPassword;
    private String securityQuestion;
    private String securityAnswer;

    /**
     * 添加用户的构造方法
     * 用到户名，密码，密保问题，密保问题答案
     * @param userName
     * @param userPassword
     * @param securityQuestion
     * @param securityAnswer
     */
    public User(String userName, String userPassword, String securityQuestion, String securityAnswer) {
        this.userName = userName;
        this.userPassword = userPassword;
        this.securityQuestion = securityQuestion;
        this.securityAnswer = securityAnswer;
    }

    /**
     * 注销用户
     * 用到用户名，密码，密保问题答案
     * @param userName
     * @param userPassword
     * @param securityAnswer
     */
    public User(String userName, String userPassword, String securityAnswer) {
        this.userName = userName;
        this.userPassword = userPassword;
        this.securityAnswer = securityAnswer;
    }

    /**
     * 用户登录
     * @param userName
     * @param userPassword
     */
    public User(String userName, String userPassword) {
        this.userName = userName;
        this.userPassword = userPassword;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getSecurityQuestion() {
        return securityQuestion;
    }

    public void setSecurityQuestion(String securityQuestion) {
        this.securityQuestion = securityQuestion;
    }

    public String getSecurityAnswer() {
        return securityAnswer;
    }

    public void setSecurityAnswer(String securityAnswer) {
        this.securityAnswer = securityAnswer;
    }

    @Override
    public String toString() {
        return "User{" +
                "用户id：" + userId +
                "用户名：" + userName +
                ", 用户密码：" + userPassword +
                ", 密保问题：" + securityQuestion +
                ", 密保问题答案：" + securityAnswer +"}";
    }

}
